﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4_2102A.Shopping.DTO
{
    /// <summary>
    /// 产品添加的输入DTO
    /// </summary>
    public class ProductInputDto
    {
        #region SPU信息   一个SPU
       public Guid BrandId { get; set; }
       public Guid CategoryId { get; set; }
        public string Name { get; set; }
        public string? Description { get; set; }
        #endregion

        #region SKU信息   一个SPU对应多个SKU
        public List<ProductSkuInputDto> Skus { get; set; }

        #endregion

        #region SPU规格信息   一个SPU对应多个规格Spec
        public List<ProductSpecInputDto> Specs { get; set; }
        #endregion
    }

    /// <summary>
    /// SKU的输入ＤＴＯ
    /// </summary>
    public class ProductSkuInputDto
    {
        #region SKU的信息

        public string Cover { get; set; }
        public decimal InPrice { get; set; }
        public int LockStock { get; set; }
        public decimal MarketPrice { get; set; }
        public decimal SalePrice { get; set; }
        public int SourceStock { get; set; }
        public string Spec { get; set; }
        public Guid SPUId { get; set; }
        public int ValidStock { get; set; }
        #endregion

        #region SKU图片信息   一个SKU对应多个图片
        public List<string> Images { get; set; }
        #endregion
    }

    /// <summary>
    /// 产品规格DTO
    /// </summary>
    public class ProductSpecInputDto
    {
        public string Name {get;set;}//规格名称
        public string Value { get; set; }  //规格名称相应的值
    }
}
